package visitors;
import arbore.*;
public abstract class Visitor {
	public abstract void visit(Nod n);
	public void visit(Frunza f){
		System.out.print(f.toString());
	}
	public void visit(NodAbstract n){
		if(n instanceof Nod)
			visit((Nod)n);
		else if(n instanceof Frunza)
			visit((Frunza)n);
	}
}
